
//
//  MessageTableViewCell.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/27.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "MessageTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation MessageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self create];
    }
    
    return self;
    
}


- (void)create {
    
    self.netWorkingLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.netWorkingLabel];
    self.netWorkingLabel.layer.borderWidth = 1;
    
    self.aboutLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.aboutLabel];
    self.aboutLabel.layer.borderWidth = 1;
    
    self.deviceLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.deviceLabel];
    self.deviceLabel.layer.borderWidth = 1;
    
    self.deviceNameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.deviceNameLabel];
    self.deviceNameLabel.layer.borderWidth = 1;
    
    self.systemLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.systemLabel];
    self.systemLabel.layer.borderWidth = 1;
    
    self.appNameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.appNameLabel];
    self.appNameLabel.layer.borderWidth = 1;
    
    self.appVersionLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.appVersionLabel];
    self.appVersionLabel.layer.borderWidth = 1;
 
}




- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    self.netWorkingLabel.frame = CGRectMake(10 * WIDTH / 375, 5 * HEIGHT / 150, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.aboutLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.deviceLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7 * 2, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.deviceNameLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7 * 3, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.systemLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7 * 4, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.appNameLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7 * 5, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    self.appVersionLabel.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 7 * 6, WIDTH - 20 * WIDTH / 375, HEIGHT / 7 - 5 * HEIGHT / 150);
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
